package demo3;
public class Computer {
    private String cpu;
    private String memory;
    private String screen;
    String brand;

    public Computer(String brand) {
        this.brand = brand;
    }

    public String getMemory() {
        return memory;
    }

    public void setMemory(String memory) {
        this.memory = memory;
    }

    public String getScreen() {
        return screen;
    }

    public void setScreen(String screen) {
        this.screen = screen;
    }

    public Computer(String brand, String cpu, String memory, String screen){
        this.brand = brand;
        this.cpu = cpu;
        this.memory = memory;
        this.screen = screen;
    }

    public void setCpu(String cpu){
        this.cpu = cpu;
    }

    public String getCpu(){
        return this.cpu;
    }
    public void boot(){
        System.out.println("开机~~~");
    }

    public void powerOff(){
        System.out.println("关机~~~");
    }

    public void surfInternet(){
        System.out.println("上网~~~");
    }

    public void show(){
        System.out.println(this.cpu);
    }
}
